import request from '@/config/axios'

// ERP SKC级产品 VO
export interface ErpProductSkcVO {
  id: number // 产品编号
  skc: number // SKC
  img: string // 轮播首图
  status: number // 状态
  purchasePrice: number // 成本
  salePrice: number // 报价
}

// ERP SKC级产品 API
export const ErpProductSkcApi = {
  // 查询ERP SKC级产品分页
  getErpProductSkcPage: async (params: any) => {
    return await request.get({ url: `/myerp/erp-product-skc/page`, params })
  },

  // 查询ERP SKC级产品详情
  getErpProductSkc: async (id: number) => {
    return await request.get({ url: `/myerp/erp-product-skc/get?id=` + id })
  },

  // 新增ERP SKC级产品
  createErpProductSkc: async (data: ErpProductSkcVO) => {
    return await request.post({ url: `/myerp/erp-product-skc/create`, data })
  },

  // 修改ERP SKC级产品
  updateErpProductSkc: async (data: ErpProductSkcVO) => {
    return await request.put({ url: `/myerp/erp-product-skc/update`, data })
  },

  // 删除ERP SKC级产品
  deleteErpProductSkc: async (id: number) => {
    return await request.delete({ url: `/myerp/erp-product-skc/delete?id=` + id })
  },

  // 导出ERP SKC级产品 Excel
  exportErpProductSkc: async (params) => {
    return await request.download({ url: `/myerp/erp-product-skc/export-excel`, params })
  }
}